import { createRouter, createWebHistory } from "vue-router";
 
let routes= [
    {
        path:'/tagSheet',
        name: 'tagSheet',
        component: () => import('../view/tagSheet/tagSheet.vue'),
        meta: { requiresAuth: true } 
    },
    {
        path:'/find',
        name: 'find',
        component: () => import('../view/find/find.vue'),
        meta: {  playlittle:false} 
       
    },
    {
        path:'/mine',
        name: 'mine',
        component: () => import('../view/mine/mine.vue'),
        meta: {  playlittle:false} 
       
    },
    {
        path:'/sheetdetail',
        name: 'sheetdetail',
        component: () => import('../view/sheetdetail/sheetdetail.vue'),
        meta: { requiresAuth: true } 
    },
    {
        path:'/songplay',
        name: 'songplay',
        component: () => import('../view/songplay/songplay.vue'),
        meta: { requiresAuth: true , playlittle:true} 
    },
    {
        path:'/login',
        name: 'login',
        component: () => import('../view/login/login.vue'),
    },
    {
        path:'/ranking',
        name: 'ranking',
        component: () => import('../view/ranking/ranking.vue'),
        meta: { requiresAuth: true } 
    },
    {
        path:'/singer',
        name: 'singer',
        component: () => import('../view/singer/singer.vue'),
        meta: { requiresAuth: true } 
    },
    {
        path:'/search',
        name: 'search',
        component: () => import('../view/search/search.vue'),
        meta: {  playlittle:false  } ,
        children: [
            {
                path:'searchresultshow',
                name:'searchresultshow',
                component: () => import('../view/search/searchresultshow.vue'),
                props: true 
            },
            {
                path:'searchcommend',
                name:'searchcommend',
                component: () => import('../view/search/searchcommend.vue'),
            },
          ],
        props: true 
    },
]
// 路由
const router = createRouter({
    history: createWebHistory(),
    routes
})
// 导出
export default router 